<?php
header('content-type:text/html;charset=utf-8');	
	ini_set('date.timezone','Asia/Shanghai');
	
	require_once $_SITE_PATH_ . "m/m_information.php";
	require_once $_SITE_PATH_ . "m/m_tasklist.php";
	//require_once 'Queue_Class.php';
	//require_once 'UpFile_ApiClient.class.php';
	
	$upfile_flag=isset($_POST['upfile_flag'])?$_POST['upfile_flag']:'';
	
	$m_information=new m_information();
	$m_tasklist=new m_tasklist();
	//$queue=new QueueClass();
	
	$m_tasklist->_ssql='select `id`,`product_id` from tasklist where ts_type="1" and excuflag="0" and ts_flag="0" and `id`=108 order by `id` ';//asc limit 0,1 
	$product_id=$m_tasklist->getArray($m_tasklist->query());
	$count=$m_tasklist->getCount(' ts_type="1" and excuflag="0" and ts_flag="0"  and `id`=108');
	$codes=new stdClass();
	if($count<=0)
		{
			exit;
		}
		else
			{
				for($i=0;$i<$count;$i++)
					{
						//echo $product_id[$i]->product_id;
						//echo '<br/>';
						//var_dump(json_decode($product_id[$i]->product_id));
						//echo '<br/><br/>';
						//var_dump(json_decode(trim($product_id[$i]->product_id,chr(231).chr(187).chr(191)),true));
						$product_id[$i]->product_id=json_decode(trim($product_id[$i]->product_id,chr(231).chr(187).chr(191)),true);//解压JSON数据
						//var_dump($product_id[$i]->product_id);
						echo json_encode($product_id[$i]->product_id);
						exit;
						$codes->rows[$i]=$product_id[$i]->product_id;
						//print_r($codes[$i]);
						//$codes.=$product_id[$i]->product_id.',';
					}
				//var_dump($codes);
				//echo '<br/>';
				//print_r($codes);
				$codes=json_encode($codes);
				echo $codes;
				//$arr=json_decode($codes);
				//print_r($arr);
				exit;
			}





?>